<%@ page language="java" pageEncoding="UTF-8"%><%@ include
	file="/WEB-INF/commons/taglibs.jsp"%>
<%@ page import="com.google.appengine.api.users.User"%>
<%@ page import="com.google.appengine.api.users.UserService"%>
<%@ page import="com.google.appengine.api.users.UserServiceFactory"%>
<%
	UserService userService = UserServiceFactory.getUserService();
	User user = userService.getCurrentUser();
%>

<c:set var="user" value="<%=user%>" />
<div id="text-menu">
<ul>
	<li class="xleft"><a href="<c:url value="/" />">首页</a>&nbsp;&nbsp;<a
		href="<c:url value="/public" />">公共主页</a>&nbsp;&nbsp;<a
		href="<c:url value="/share" />">分享一个电话</a></li>
	<li class="xright"><c:choose>
		<c:when test="${not empty user}">欢迎你, ${user.nickname}&nbsp;&nbsp;<a
				href="<%=userService.createLogoutURL(request.getRequestURI())%>">退出</a>
		</c:when>
		<c:otherwise>
			<a href="<%=userService.createLoginURL(request.getRequestURI())%>">登录</a>
		</c:otherwise>
	</c:choose></li>
</ul>
</div>
<c:set var="user" value="<%=user%>" />
<c:if test="${not empty user}">
	<div id="menu"><%@ include file="/WEB-INF/commons/menu.jsp"%></div>
</c:if>